<%--
  Created by IntelliJ IDEA.
  User: Txigua！
  Date: 2020/10/10
  Time: 0:02
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hotel</title>
    <link rel="stylesheet" href="../css/contact.css">
    <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=uZCuhqqOGl5NhdeoqG0CoeQ9YfZGBIfr"></script>
    <script type="text/javascript" src="//api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
    <link rel="stylesheet" href="//api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
</head>
<body>
<jsp:include page="top1.jsp"></jsp:include>
<jsp:include page="top2.jsp"></jsp:include>
<div class="contact">
    <div>
        <div class="first-info">
            <div>
                <div><img class="https://hotels-66.view.sitestar.cn/" src="../img/jd_mhoe.png" width="150px"></div>
                <div>订房热线</div>
                <div></div>
                <div>${companyInformationModel.phone}</div>
            </div>
            <div>
                <div>
                    <div>服务项目</div>
                    <div>SERVICE ITEMS</div>
                </div>
            </div>
            <div>
                <c:forEach items="${serviceItemsModelList}" var="serviceItemsModel" varStatus="s">
                    <div>
                        <div>${serviceItemsModel.serviceType}</div>
                    </div>
                </c:forEach>
            </div>
            <div>
                <img src="../img/xt_vbih.jpg"/>
            </div>
            <div>
                <div>点击立即订房</div>
            </div>
        </div>
        <div class="second-info">
            <div>
                <div>
                    <div>您的位置：</div>
                    <div class="son-info">
                        <div>网站首页</div>
                        <div> ::</div>
                        <div>联系我们</div>
                    </div>
                </div>
                <div>
                    <!--                        <div> ></div>-->
                </div>
            </div>
            <div class="secondson-text">
                ${companyInformationModel.ad}
                <div class="oneson-text">
                    <div>
                        <div>${companyInformationModel.introduce}</div>
                    </div>
                    <div>
                        <div>地址：${companyInformationModel.address}</div>
                        <div class="grandson-info">
                            <div>电话：${companyInformationModel.phone}</div>
                            <div> 传真：${companyInformationModel.fax}</div>
                            <div> 邮箱：${companyInformationModel.email}</div>
                        </div>
                        <div>网址：${companyInformationModel.net}</div>
                    </div>
                </div>
            </div>
            <div id="allmap"></div>
        </div>
    </div>
</div>
<jsp:include page="foot.jsp"></jsp:include>
</body>
</html>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");    // 创建Map实例
    map.centerAndZoom(new BMap.Point(104.066394, 30.579332), 11);  // 初始化地图,设置中心点坐标和地图级别
    //添加地图类型控件
    map.addControl(new BMap.MapTypeControl({
        mapTypes: [
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]
    }));
    map.setCurrentCity("成都");          // 设置地图显示的城市 此项是必须设置的
    map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
</script>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");
    map.centerAndZoom(new BMap.Point(104.066394, 30.579332), 11);

    var top_left_control = new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT});// 左上角，添加比例尺
    // var top_left_navigation = new BMap.NavigationControl();  //左上角，添加默认缩放平移控件
    // var top_right_navigation = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT, type: BMAP_NAVIGATION_CONTROL_SMALL}); //右上角，仅包含平移和缩放按钮
    /*缩放控件type有四种类型:
    BMAP_NAVIGATION_CONTROL_SMALL：仅包含平移和缩放按钮；BMAP_NAVIGATION_CONTROL_PAN:仅包含平移按钮；BMAP_NAVIGATION_CONTROL_ZOOM：仅包含缩放按钮*/

    //添加控件和比例尺
    function add_control(){
        map.addControl(top_left_control);
        // map.addControl(top_left_navigation);
        // map.addControl(top_right_navigation);
    }
    //移除控件和比例尺
    // function delete_control(){
    //     map.removeControl(top_left_control);
    //     map.removeControl(top_left_navigation);
    //     map.removeControl(top_right_navigation);
    // }
</script>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map('allmap');
    var poi = new BMap.Point(104.066394, 30.579332);
    map.centerAndZoom(poi, 16);
    map.enableScrollWheelZoom();

    var content = '<div style="margin:0;line-height:10px;padding:2px;">'  +
        '地铁1号线到孵化园站' +
        '</div>';

    //创建检索信息窗口对象
    var searchInfoWindow = null;
    searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
        title  : "成都高兴区天府大道1号",      //标题
        width  : 290,             //宽度
        height : 50,              //高度
        panel  : "panel",         //检索结果面板
        enableAutoPan : true,     //自动平移
        searchTypes   :[
            BMAPLIB_TAB_SEARCH,   //周边检索
            BMAPLIB_TAB_TO_HERE,  //到这里去
            BMAPLIB_TAB_FROM_HERE //从这里出发
        ]
    });
    var marker = new BMap.Marker(poi); //创建marker对象
    marker.enableDragging(); //marker可拖拽
    marker.addEventListener("click", function(e){
        searchInfoWindow.open(marker);
    })
    map.addOverlay(marker); //在地图中添加marker
</script>